package com.hw.esay.myExam;

import java.util.Scanner;
//统计字符

/**
 * 对于给定的由可见字符和空格组成的字符串，统计其中英文字母、空格、数字和其它字符的个数。
 */

public class HJ40 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNext()){
            String str = scan.nextLine();
            char[] chars = str.toCharArray();
            int engLish = 0;
            int space=0;
            int num =0;
            int others=0;
            for(Character xchar : chars){
                if(Character.isLetter(xchar)){
                    engLish++;
                }else if(Character.isDigit(xchar)){
                    num++;
                }else if(Character.isSpaceChar(xchar)){
                    space++;
                }else{
                    others++;
                }
            }
            System.out.println(engLish);
            System.out.println(space);
            System.out.println(num);
            System.out.println(others);
        }

    }
}
